package com.learn.file;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;

public class CopyBufferedReader {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new FileReader("in.txt"));
        String len;
        while ((len=br.readLine())!=null){
            System.out.println(len);
        }
        br.close();


        System.out.println("------------------------");
        BufferedWriter bw = new BufferedWriter(new FileWriter("out.txt"));
        bw.write("个 水电费");
        bw.newLine();
        bw.write("hello");
        bw.close();
    }
}
